<template>
  <div>
    <div class="head">
      <i class="iconfont icon-left"
         @click="go()"></i>
      <div class="person-center">登录注册</div>
      <i class="iconfont icon-menuunfold" @click="display()"></i>
      <ul class="nav" v-show="isActive">
        <li>
          <router-link to="/showss"  :class="'nav-link'">
            <i class="iconfont icon-sanguohome"></i>
            <span>首页</span>
          </router-link>
        </li>
        <li>
          <router-link to="/typess"  :class="'nav-link'">
            <i class="iconfont icon-icon04"></i>
            <span>分类搜索</span>
          </router-link>
        </li>
        <li>
          <router-link to="/shopcarss"  :class="'nav-link'">
            <i class="iconfont icon-shop-cart-"></i>
            <span>购物车</span>
          </router-link>
        </li>
        <li>
          <router-link to="/myss"  :class="'nav-link'">
            <i class="iconfont icon-i-smile"></i>
            <span>我的</span>
          </router-link>
        </li>
      </ul>
    </div>
    <div class="title">
      <div class="img-box">
        <img src="../../assets/images/m_hualogo.png"
             alt="">
      </div>
    </div>
    <signup></signup>
    <div class="oth-login">
      <p class="oth-login-title">其他登录方式</p>
      <div class="login-list">
        <p>
          <router-link to="">
            <i class="iconfont icon-qq"></i>
            <span>
              QQ
            </span>
          </router-link>
          <p>
            <router-link to="">
              <i class="iconfont icon-zhifubao"></i>
              <span>
                支付宝
              </span>
            </router-link>
          </p>
          <p>
            <router-link to="/emailInss" :class="'email'">
              <i class="iconfont icon-youxiang"></i>
              <span>
                邮箱注册
              </span>
            </router-link>
          </p>
      </div>
    </div>
  </div>
</template>

<style scoped>
.head {
  padding: 0px 20px;
  display: flex;
  justify-content: space-between;
  position: relative;
}
.person-center {
  height: 3.14rem;
  line-height: 3.14285714rem;
  background: #fff;
  font-size: 1.14rem;
  text-align: center;
  line-height: 3.14rem;
  position: relative;
}

.iconfont {
  display: block;
  line-height: 3.14rem;
  font-size: 20px;
}
.title {
  overflow: hidden;
}
.img-box {
  width: 50%;
  margin: 0px auto;
  margin-top: 2.3rem;
}
.img-box img {
  display: inline-block;
  width: 100%;
}
.oth-login {
  margin: 3.5rem 1.43rem;
  text-align: center;
}
.login-list {
  display: flex;
  justify-content: space-between;
  width: 95%;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 0.7rem;
}
.login-list p {
  width: 33%;
}
.router-link-active {
  display: block;
  width: 100%;
  text-decoration: none;
  color: black;
}
.login-list .iconfont {
  display: inline;
  color: #1cacea;
  font-size: 1.5rem;
  vertical-align: middle;
}

.login-list span {
  font-size: 0.8rem;
  margin-left: 0.28rem;
}
.oth-login-title {
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.2);
  width: 10rem;
  margin: 0rem auto -0.6rem;
  background: #fff;
  text-align: center;
  position: relative;
  z-index: 99;
}
.nav {
  position: absolute;
  background: white;
  right: 10px;
  top: 3rem;
  font-size: 14px;
  border: 1px solid #e9ecf0;
  border-radius: 0.286rem;
  box-shadow: 0 4px 12px 0 #e9ecf0;
}
.nav .iconfont {
  line-height: normal;
  display: inline-block;
  font-size: 1rem;
  margin-right: 0.4rem;
}
.nav li {
  height: 3rem;
  line-height: 3rem;
  padding: 0rem 0.85rem;
}
.nav::before {
  content: "";
  width: 6px;
  height: 6px;
  background:white;
  position: absolute;
  transform: rotate(45deg);
  border-left: 1px solid #e9ecf0;
  border-top: 1px solid #e9ecf0;
  top:-5px;
  right:15px;
}
.nav-link{
  text-decoration: none;
  color: black;
}
.email{
  color: black;
  text-decoration: none;
}
</style>

<script>
import signup from '../common/signUp';
export default {
  data(){
    return{
      isActive:false
    }
  },
  components: {
    signup
  },
  methods: {
    go () {
      this.$router.back();
    },
    display(){
       this.isActive=!this.isActive
    }
  }
}
</script>